package net.showcal.api.request.mobile;


import com.alibaba.fastjson.JSON;
import net.showcal.api.ApiRuleException;
import net.showcal.api.XiniuRequest;
import net.showcal.api.domain.mobile.OpenTypeEnum;
import net.showcal.api.internal.util.XiniuHashMap;
import net.showcal.api.response.mobile.UserExistByOpenIdResponse;

import java.util.Map;



/**
* <p/>
*
<pre>
 * ***************************************************************
 *  Copyright (c) 2014 –瘦咖(上海)网络技术有限公司
    *  Title: com.xiniunet.temp.helper.TempHelperImpl
    *  Description: temp Request
    *  @since
    *  @author 张士辉
    * ***************************************************************
 * </pre>
*/
public class UserExistByOpenIdRequest implements XiniuRequest<UserExistByOpenIdResponse> {
private XiniuHashMap udfParams = new XiniuHashMap();
/**
* 获取API名称
*/
@Override
public String getApiMethodName() {
return "temp.existByOpenId.user";
}

    /**
    * 
    */
    private OpenTypeEnum type;
    /**
    * 
    */
    private String openId;

    public OpenTypeEnum getType(){
    return type;
    }

    public void setType(OpenTypeEnum type){
    this.type=type;
    }

    public String getOpenId(){
    return openId;
    }

    public void setOpenId(String openId){
    this.openId=openId;
    }

@Override
public Map
<String, String> getTextParams() {
    XiniuHashMap txtParams = new XiniuHashMap();
    if(this.type!=null){
        txtParams.put("type", this.type.toString());
    }

        txtParams.put("openId", this.openId);
if(this.udfParams != null) {
txtParams.putAll(this.udfParams);
}
return txtParams;
}

@Override
public Long getTimestamp() {
return null;
}

@Override
public void setTimestamp(Long timestamp) {

}

@Override
public Class getResponseClass() {
return UserExistByOpenIdResponse.class;
}

@Override
public void check() throws ApiRuleException {
}

@Override
public Map
<String, String> getHeaderMap() {
return null;
}

@Override
public void putOtherTextParam(String key, String value) {
this.udfParams.put(key,value);
}
}